<template>
  <view>
   <view class="search-contanier" :style="{'background-color':bgcolor}" @click="searchHandle">
     <view class="search-box" :style="{'border-radius': radius +'px'}">
       <uni-icons type="search" size="17"></uni-icons>
       <text class="text">搜索</text>
       
     </view>
     
   </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props:{
      bgcolor:{
        type:String,
        default:'#c00000'
      },
      radius:{
        type:Number,
        default:15 //px
      }
    },
    methods:{
      searchHandle(){
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.search-contanier {
  background-color: #c00000;
  height: 50px;
  display: flex;
  padding: 0 10px;
  align-items: center;
  .search-box{
    height: 36px;
    width: 100%;
    background-color: #FFFFFF;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    .text {
      font-size: 15px;
      margin-left: 10px;
    }
  }
}
</style>
